package pers.xiaojun.boot.module.system.controller.permission.vo.role;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import pers.xiaojun.boot.common.constants.DateTimePatternConstants;
import pers.xiaojun.boot.common.pojo.PageParam;

import java.time.LocalDateTime;

/**
 * 角色请求参数实体
 *
 * @author xiaojun
 * @since 2025-10-28
 */
@Schema(description = "角色请求参数实体-VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class RoleReqVO extends PageParam {

    @Schema(description = "角色名称，模糊匹配", example = "XIAO钧i")
    private String name;

    @Schema(description = "角色标识，模糊匹配", example = "xiaojun")
    private String code;

    @Schema(description = "展示状态，参见 CommonStatusEnum 枚举类", example = "1")
    private Integer status;

    @Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")
    @DateTimeFormat(pattern = DateTimePatternConstants.ISO_DATE_TIME)
    @Size(min = 2, max = 2, message = "需要指定起止时间")
    private LocalDateTime[] createTime;

}
